import java.util.Scanner;
public class Test5 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入5个数字：");
        int[] arr = new int[5];
        for (int i = 0; i < 5; i++) {
            int re = scanner.nextInt();
            arr[i] = re;
        }
        for (int i = 0,j = 4; i < j; i++,j--) {
            int temp = arr[i];
            arr[i] = arr[j];
            arr[j] = temp;
        }
        System.out.println("反转过后为：");
        for(int i: arr){
            System.out.print(i+" ");
        }
    }
}
